<template>
<span :class="wrapper_name">
  <button v-if="col.btns.SYNC" class="ui button primary mini" @click.stop.prevent="to_sync(col.val)" title="更新对应权限">
    {{col.btns.SYNC}}
  </button>
</span>
</template>
<script type="text/ecmascript-6">
  import tool from 'src/util/tool';
  import util from '_util/index';

  export default {
    data() {
      return {
      }
    },
    methods: {
      to_sync(id){
          util.showConfirm(this, () => {
              let url = tool.getApi(this, 'Authority', 'auth_tpl_sync');
              let param = {
                  id: id
              };
              util.http.SR(this, url, param, '更新成功');
          });

      },
    },
    computed: {
      ctl(){
        return this.$route.query.ctl;
      },
      is_admin(){
        return util.is_admin(this);
      },
    },
    watch: {
    },

    props: ['col','_id','detail_info','wrapper_name'],
    created() {
    },
  }
</script>
<style rel="stylesheet/less" lang="less"></style>
